<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>fmt:timeZone设置时区</title>
</head>
<body>
	<div style="margin: auto; width: 80%">
		<h2>fmt:timeZone设置时区</h2>
		<c:set var="now" value="<%=new java.util.Date()%>" />
		<table border="1" width="100%">
			<tr>
				<td width="100%" colspan="2" bgcolor="#d6d6d6">
					<p align="center">
						<b> <font color="#FFFFFF" size="4">格式化为: <fmt:formatDate
									value="${now}" type="both" timeStyle="long" dateStyle="long" />
						</font>
						</b>
					</p>
				</td>
			</tr>

			<c:forEach var="zone"
				items="<%=java.util.TimeZone.getAvailableIDs()%>">
				<tr>
					<td width="51%"><c:out value="${zone}" /></td>
					<td width="49%"><fmt:timeZone value="${zone}">
							<fmt:formatDate value="${now}" timeZone="${zn}" type="both" />
						</fmt:timeZone></td>
				</tr>
			</c:forEach>
		</table>
	</div>
</body>
</html>